﻿using UnityEngine;
using System.Collections;

public class Button : MonoBehaviour 
 {

	public string Scene;
		
	SpriteRenderer renderer;

	Sprite mouseExitSprite;

	public Sprite mouseEnterSprite;
		
	void Start () 
	{
		renderer = GetComponent<SpriteRenderer>();

		mouseExitSprite = renderer.sprite;
	}
		
	void OnMouseEnter() 
	{
		renderer.sprite = mouseEnterSprite;
	}
		
	void OnMouseExit()
	{
		renderer.sprite = mouseExitSprite;
	}
		
	void OnMouseDown()
	{
		Application.LoadLevel(Scene);
	}
		
 }
